package com.yixin.hospital.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum GuidanceStatusEnum {

    WAITING(0, "候诊中"),
    VISITING(1, "就诊中"),
    CHECKING(2, "待检查"),
    PAYING(3, "待缴费"),
    DRUG(4, "待取药"),
    CHECKING_DRUG(5, "检查/取药"),
    DONE(6, "完成"),
    SUSPEND(7, "中止"),
    ;

    private Integer code;
    private String desc;


    public static String getDesc(int code) {
        for (GuidanceStatusEnum guidanceEnum : GuidanceStatusEnum.values()) {
            if (guidanceEnum.getCode() == code) {
                return guidanceEnum.getDesc();
            }
        }
        return "";
    }

}
